package com.test.JVM;

public class HeolloGC {

    public static void main(String[] args) throws Exception {
        System.out.println("**********hellogc----------");
        Byte[] bytes = new Byte[50 * 1024 * 1024];
//        Thread.sleep(Integer.MAX_VALUE);
//        long totalMemory = Runtime.getRuntime().totalMemory();//返回jvm中内存总量
//        long maxMemory = Runtime.getRuntime().maxMemory();//返回jvm视图使用的最大内存量
//        System.out.println("Total_memory(-Xms) = "+totalMemory + "字节，"+totalMemory/1024/1024 + " MB");
//        System.out.println("Max_memory(-Xmx) = "+maxMemory + "字节，"+maxMemory/1024/1024 + " MB");

    }
}
